﻿using System;
using Microsoft.Xna.Framework;


namespace SpaceGame.Gameplay
{
    /// <summary>
    /// Player input abstraction for ships.
    /// </summary>
    public struct ShipInput
    {
        #region Input Data


        /// <summary>
        /// The left-stick value of the ship input, used for movement.
        /// </summary>
        public Vector2 LeftStick;

        /// <summary>
        /// The right-stick value of the ship input, used for firing.
        /// </summary>
        public Vector2 RightStick;

        /// <summary>
        /// If true, the player is trying to fire a mine.
        /// </summary>
        public bool MineFired;

        /// <summary>
        /// If true, the player ins trying to join the game.
        /// </summary>
        public bool TriedJoined;

        /// <summary>
        /// If true, the player ins trying to leave the game.
        /// </summary>
        public bool TriedLeaving;


        #endregion

        public void Reset()
        {
            LeftStick = Vector2.Zero;
            RightStick = Vector2.Zero;
            MineFired = false;
            TriedJoined = false;
            TriedLeaving = false;
        }
    }
}
